
<script type="text/javascript">  
  $(function(){   
  $('#cartform').bind('keypress', function(e) {    
    if(e.keyCode==13)    {     
      $(this).submit();     
      return false;    
    }  
    recalcAmount($('.quantity input'));
  }); 
});
</script>
<div class="style-block" style="background: {{settings.bg_color6}};">
  <h2><span>Корзина</span></h2>
  <script type="text/javascript" src="{{ 'shop/cart.js' | global_asset_url }}"></script>
  {% if cart.items != empty %}
  <form action="/cart_items" method="post" id="cartform">   <input type="hidden" value="put" name="_method">   <input type="hidden" name="lang" value="{{ language.locale }}">
    <table class="cart-table">
      <col style="width: 1%;" />
      <col />
      <col style="width: 1%;" />
      <col style="width: 1%;" />
      <col style="width: 1%;" />
      <col style="width: 1%;" />
      <tbody>
        {% for item in cart.items %}
        <tr id="cart_order_line_{{ item.id }}">
          <td><a href="{{item.product.url}}" class="img" style="background: url({{item.product.first_image.compact_url}}) center center no-repeat #fff;"></a></td>
          <td class="item-title"><h3><a rel="nofollow" class="decoration" href="{{item.product.url}}">{{item.title}}</a></h3>   
          </td>
          <td class="price sale-price">{{ item.sale_price | money }}  
          </td>
          <td class="quantity">
            <div>
              <span class="fl">&times;</span>
              <span class="arrows fl">        
                <input type="text" disabled="disabled" class="quantity_input qwt" data-price="{{item.sale_price}}" value="{{ item.quantity }}" /> 
                <span class="plus"></span>
                <span class="minus"></span>
              </span> 
              <span class="fl">=</span>
              <input type="hidden" class="qwnt qwt2" value="{{ item.quantity }}"  price="{{ item.sale_price }}" name="cart[quantity][{{ item.id }}]" size="3" maxlength="4" autocomplete="off" />
            </div>
          </td>
          <td class="price total-price">{{ item.total_price | money }}</td>
       <td class="del"><a href="{{item.url}}" iid="delete_{{ item.id }}">&times;</a>        
       </td>
      </tr>
      {% endfor %}
     </tbody>
    </table>
	    <div class="discounts-list">
		 {% for discount in cart.discounts %}
            <div class="item">{{ discount.description }}: &minus;<span class="price">{{ (discount.amount) | money }}</span></div>
         {% endfor %}
        </div> 	
	<br clear="all">
    {% if cart.enable_coupon? %}
    <div class="coupon fl">
     <lable>Купон</lable>
     <input type="text" class="txt" value="{{ cart.coupon }}"  name="cart[coupon]" />&nbsp;<input type="button" onclick="this.form.submit(false)" class="button" value="Применить" />
      {% if cart.invalid_coupon? %}
      <p class="error">Указан несуществующий купон, убедитесь что он введен верно.</p>
      {% endif %}
    </div>
{% endif %}  


     
       

  
        




  
<input type="submit"  name="make_order" id="create_order" class="buy_button fr" value="Оформить" />
  <div class="total-amount">Итог: <span id="total_price" class="price total_amount_s total_amount">{{ cart.items_price | money}}</span></div>
  </form>  
  <script>  $(function(){ cartTriggers(); }); </script>  
  
<p class="cart-message" style="display: none;">Ваша корзина пуста</p>
{% else %}
<p class="cart-message">Ваша корзина пуста</p>
{% endif %}
</div>